hysop package¶
Python package dedicated to flow simulation using particular methods on hybrid architectures (MPI-GPU)
- class hysop.Box(length=None, origin=None, dim=None, lboundaries=None, rboundaries=None, **kwds)[source]¶
-
Box-shaped domain description.
Initialize this object. If self._initialized was already set to True, raise a RuntimeError. Else, set self._initialized to True.
- static __new__(cls, length=None, origin=None, dim=None, lboundaries=None, rboundaries=None, **kwds)[source]¶
Create or get an existing Box from a dimension, length and origin with specified left and right boundary conditions.
- Parameters:
length (array like of float, optional) – Box sides lengthes. Default = [1.0, …]
origin (array like of float, optional) – Position of the lowest point of the box. Default [0.0, …]
dim (int, optional) – Dimension of the box.
lboundaries (array_like of BoxBoundaryCondition) – Left boundary conditions.
rboundaries (array_like of BoxBoundaryCondition) – Right boundary conditions.
- length¶
Box sides lengthes.
- Type:
np.ndarray of HYSOP_REAL
- origin¶
Position of the lowest point of the box.
- Type:
np.ndarray of HYSOP_REAL
- end¶
Position of the greatest point of the box.
- Type:
np.ndarray of HYSOP_REAL
- lboundaries¶
Left boundary conditions.
- Type:
np.ndarray of BoxBoundaryCondition
- rboundaries¶
Right boundary conditions.
- Type:
np.ndarray of BoxBoundaryCondition
- class hysop.BufferParameter(shape=None, dtype=<class 'numpy.float64'>, initial_value=None, symbol=None, **kwds)[source]¶
Bases:
Parameter
A buffer parameter is np.ndarray with specific shape and dtype. A parameter is a value that may change as simulation advances.
Initialize a TaggedObject with a tag prefix/postfix/formatter, all optional.
- property ctype¶
Get the data type of the discrete field as a C type.
- property dtype¶
Get parameter dtype.
- property ndim¶
Get parameter ndim.
- property shape¶
Get parameter shape.
- property size¶
Get parameter size.
- class hysop.CartesianDiscretization(resolution, ghosts=None, lboundaries=None, rboundaries=None, default_boundaries=False)[source]¶
Bases:
CartesianDiscretization
A struct to handle discretization parameters: - a resolution (either a list of int or a numpy array of int)
resolution is GRID_RESOLUTION. GLOBAL_RESOLUTION is GRID_RESOLUTION + PERIODICITY.
- number of points in the ghost-layer. One value per direction, list
or array. Default = None (ie. no ghosts).
- global boundary conditions that should be prescribed on the left and the
right of the box shaped domain for each axis. Defaults to periodic boundary conditions everywhere.
Create new instance of CartesianDiscretization(resolution, ghosts, lboundaries, rboundaries)
- property boundaries¶
Left and right boundary conditions as a tuple.
- property global_resolution¶
Logical grid resolution (grid_resolution + periodicity). Can only be fetched if boundaries have been specified.
- property grid_resolution¶
Effective grid resolution given by user.
- property periodicity¶
- class hysop.CartesianTopology(domain, discretization, mpi_params=None, cart_dim=None, cart_shape=None, is_periodic=None, cutdirs=None, mesh=None, cartesian_topology=None, cl_env=None, **kwds)[source]¶
Bases:
CartesianTopologyView
,Topology
CartesianTopology topologies defined on cartesian meshes which communicates accross processes through a MPI CartesianTopology communicator.
Initialize this object. If self._initialized was already set to True, raise a RuntimeError. Else, set self._initialized to True.
- static __new__(cls, domain, discretization, mpi_params=None, cart_dim=None, cart_shape=None, is_periodic=None, cutdirs=None, mesh=None, cartesian_topology=None, cl_env=None, **kwds)[source]¶
Initializes or get an existing CartesianTopology topology.
- Parameters:
domain (
Box
) – The box geometry on which the cartesian topology is defined.discretization (
CartesianDiscretization
) – Description of the global space discretization of the box (resolution, ghosts, and boundary conditions).mpi_params (
MPIParams
, optional) – MPI parameters (comm, task …). If not specified, comm = domain.task_comm, task = domain.curent_task()backend (
Backend
or ~hysop.core.arrays.ArrayBackend, optional) – Backend or backend kind for this topology. By default a topology will use Backend.HOST.cart_dim (int, optional) – MPI topology dimension.
cart_shape (list or array of int, optional) – MPI grid layout, should be sized as the domain dimension.
is_periodic (tuple, list or array of bool, optional) – MPI grid periodicity, overrides discretization boundary conditions.
cutdirs (list or array of bool, optional) – Set which directions may be distributed, cutdirs[dir] = True allow MPI to distribute data along dir.
mesh (
CartesianMesh
, optional) – A predifined mesh (it includes local and global grids.)cartesian_topology (
Cartcomm
, optional) – A predefined mpi cartesian topology. Use this when you need the same communicator for two different meshes/space distribution of data.kwds (dict) – Base class arguments. Includes allocator, cl_env and queue.
- global_resolution¶
Resolution of the global mesh (as given in the discretization parameter).
- Type:
np.ndarray of HYSOP_INTEGER
- ghosts¶
CartesianDiscretization ghosts of local-to-process mesh (as given in the discretization parameter).
- Type:
np.ndarray of HYSOP_INTEGER
- mesh¶
Local mesh on the current mpi process.
- Type:
CartesianMeshView
:
- cart_comm¶
MPI cartesian topology intracommunicator.
- Type:
Cartcomm
- cart_dim¶
MPI_Cart topology dimension. Dimension of the MPI cartesian communicator. This dimension may be smaller than the domain dimension, because some directions may not be distributed.
- Type:
- cart_size¶
MPI_Cart grid size. Size of the MPI cartesian communicator (total number of MPI processes).
- Type:
- cart_rank¶
MPI_Cart rank. Rank of the current process in the cartesian communicator. May be different than self.mpi_params.rank.
- Type:
- cart_coords¶
Coordinate of this process in the cartesian communicator grid. The returned tuple is of dimension self.dimension.
- Type:
np.ndarray of np.int32
- cart_shape¶
MPI_Cart grid shape. Shape of the MPI cartesian communicator.
- Type:
np.ndarray of np.int32
- cart_ranks¶
Return all ranks of this cartesian topology as a np.ndarray such that array[cart_coords] = rank.
- Type:
np.ndarray of np.int32
- cart_ranks_mapping¶
Return all ranks of the parent MPI communicator as a np.ndarray such that array[cart_coords] = parent rank.
- Type:
np.ndarray of np.int32
- cart_neighbour_ranks¶
Return the ranks of the neighbours nodes as obtained by MPI_Cart_shift. self.neighbours[0,i] (resp. [1,i]) is the previous (resp. next) neighbour in direction i.
- Type:
np.ndarray
- proc_coords¶
Coordinates of this process in the extended cartesian grid (ie. with non distributed directions included). The returned tuple is of dimension self.domain_dim.
- proc_shape¶
Processus grid shape, same as cart_shape but extended with non distributed directions.
- proc_ranks¶
Return all ranks of this cartesian topology as a np.ndarray such that array[proc_coords] = rank.
- Type:
np.ndarray of np.int32
- proc_ranks_mapping¶
Return all ranks of the parent MPI communicator as a np.ndarray such that array[proc_coords] = parent rank.
- Type:
np.ndarray of np.int32
- proc_neighbour_ranks¶
Return the ranks of the neighbours nodes as obtained by MPI_Cart_shift. self.neighbours[0,i] (resp. [1,i]) is the previous (resp. next) neighbour in axe i. If axe is not distributed, self.neighbours[:,i] returns [-1,-1].
- Type:
np.ndarray
- is_distributed¶
Directions which have been distributed, is_distributed[dir] = True means that data has been distributed along dir.
- is_periodic¶
MPI grid periodicity. is_periodic[dir] = True means that the MPI grid is periodic along dir. /!This is not equivalent to domain periodicity, as a periodic
direction might not be distributed in the MPI cartesian grid or might be forced to be periodic for other reasons through the is_periodic parameter override. Domain periodicity is self.domain.periodicity
- Notes¶
- ------
- \* Almost all parameters above are optional.
Only one must be chosen among dim, cutdirs and shape. See MPI topologies and space discretisation in the Hysop User Guide for details.
- \* When cartesian_topology is given, dim, shape and cutdirs parameters,
if set, are not used to build the mpi topology, but compared with cartesian_topology parameters. If they do not fit, error is raised.
- \* Unless is_periodic is specified periodicity is extracted
from domain boundary conditions.
- \* All attributes are read-only properties.
- discretize(field)[source]¶
Discretize a continous field on this topology and return a DiscreteField.
- class hysop.Domain(dim, parent_comm=None, proc_tasks=None, **kwds)[source]¶
Bases:
RegisteredObject
Abstract base class for the description of physical domains.
Initialize this object. If self._initialized was already set to True, raise a RuntimeError. Else, set self._initialized to True.
- static __new__(cls, dim, parent_comm=None, proc_tasks=None, **kwds)[source]¶
Create or get an existing physical domain of given dim on a specified MPI communicator and specific tasks.
- Parameters:
dim (integer, optional) – dim of the domain.
parent_comm (MPI.Intracomm, optional) – Parent communicator which may be split. If not given this will be hysop.core.mpi.main_comm.
proc_tasks (tuple of ints or tuples of int, optional) – Mapping between mpi process rank and task identifier. If not given all procs will be on task HYSOP_DEFAULT_TASK_ID.
- proc_tasks¶
Mapping between mpi process rank and task identifier.
- parent_comm¶
Return the parent communicator used to create this domain.
- Type:
MPI.Intracomm
- task_comm¶
Return the communicator that owns the current process. This is the sub-communicator which has been obtained by splitting the parent communicator by colors (proc_tasks).
- Type:
MPI.IntraComm
- registered_topologies¶
Dictionary of all topologies already built on this domain with topology ids as keys and
Topology
as values.- Type:
Notes
*Parent communicator is split/subgrouped according to proc_tasks. *About MPI Tasks
- proc_tasks[n] = 12 means that task 12 owns proc n
or equivalently that proc n is dedicated to task 12.
proc_tasks[n] = (12, 13) means that proc n is dedicated to both tasks 12 and 13.
- *Examples of supported mapping:
None or [1,1,1,1] : Single task (nothing more to do)
[1,2,2,2] : disjoint tasks (two task_comm created by Comm_Split and one intercommunicator for each other task)
[(1,2), (1,2), (2,), (2,)] : nested tasks (use the largest task intracommunicator as inter-task communication)
[(1,), (1,2), (2,), (2,)] : non zero intersection (Not handled yet)
[(1,2), (1,), (2,), (2,)] : non zero intersection with same leader (Not handled yet)
- *A dupped parent_comm will return another idenpendent domain instance,
because MPI communicators are hashed trough their python object id.
- register_topology(topo)[source]¶
Register a new topology on this domain. Do nothing if an equivalent topology is already in the list.
- hysop.Field¶
alias of
FieldContainerI
- class hysop.IO[source]¶
Bases:
object
Static class with utilities to set/find the place where i/o files will be read/written.
- ASCII = 997¶
ascii format id
- HDF5 = 998¶
HDF5 format id
- static check_dir(filepath, io_rank=0, comm=None)[source]¶
Check if the directory of ‘filename’ exists and creates it if not.
- Parameters:
filepath (string) – directory path with full or relative path
io_rank (int) – processus rank that does the check.
comm (mpi communicator) – the mpi communicator that does the check.
- classmethod default_path()[source]¶
Get the current default path used for io.
- Returns:
the default value of the current i/o path.
- Return type:
string
- classmethod default_ram_path()[source]¶
Get the current default path used for io in memory.
- Returns:
the default value of the current RAM i/o path.
- Return type:
string
- static get_datasetnames(filename)[source]¶
Return the list of dataset names present in hdf input file
- Parameters:
filename (string) – hdf file
- Return type:
a list of strings
- class hysop.IOParams(filename, filepath=None, frequency=1, fileformat=None, dump_times=None, dump_tstart=None, dump_tend=None, dump_func=None, io_leader=0, visu_leader=0, with_last=False, enable_ram_fs=False, force_ram_fs=False, dump_is_temporary=False, postprocess_dump=None, hdf5_disable_compression=False, hdf5_disable_slicing=False, append=False, **kwds)[source]¶
Bases:
IOParams
A struct to handle I/O files parameters
- Parameters:
filename (string) – Name of the file (absolute or relative path)
filepath (string) – Location of the file
frequency (int) – Frequency of output or input (e.g. every N times steps)
fileformat (int) – Format of the file. See notes for available format. Default=HDF5.
dump_times (tuple of floats) – Extra dump times that should be used to dump in addition to frequency (double precision)
dump_tstart (float) – Start to dump at given time. Defaults to -np.inf (no time constraints).
dump_tend (float) – Stop to dump at given time. Defaults to +np.inf (no time constraints).
dump_func (function) – Generic function to compute the should_dump result.
with_last (boolean) – should dump when iteration is last one
io_leader (int) – Rank of the mpi process dealing with the io. Default is 0.
visu_leader (int) – Rank of the mpi process dealing with the graphical io. Default is 0.
enable_ram_fs (bool) – Instruct the dumper to write directly to RAM, fallback to filepath/filename when this is not possible.
force_ram_fs (bool) – Force the dumper to write directly to RAM, and raise an error when this is not possible (filepath/filename are ignored). Implies enable_ram_fs.
dump_is_temporary (bool) – Instruct the dumper to delete dumped data from disk or RAM after postprocessing script has been called. Implies that a postprocessing script is supplied.
postprocess_dump (str) – Path to a postprocessing script that will be called after dump. See hysop/tools/postprocess_dump.sh for an example of post processing script.
hdf5_disable_compression (bool) – Disable compression for HDF5 outputs (when available). Can be used to accelerate in RAM postprocessing.
hdf5_disable_slicing (bool) – Disable slicing for HDF5 outputs (when available). May reduce performance but avoid hdf5 file fragmentation.
append (bool, optional) – Tell if appended (on xmf files, when using hdf format)
kwds (dict) – Custom extra keyword arguments to pass to operators
hysop.operator.hdf_io (See examples in)
Notes
Create new instance of IOParams(filename, filepath, frequency, fileformat, dump_times_fp32, dump_times_fp64, dump_tstart, dump_tend, dump_func, io_leader, visu_leader, with_last, enable_ram_fs, force_ram_fs, dump_is_temporary, postprocess_dump, append, hdf5_disable_compression, hdf5_disable_slicing, disk_filepath, kwds)
- property dump_times¶
- class hysop.MPIParams(comm=<mpi4py.MPI.Intracomm object>, task_id=999, rank=0, on_task=True)[source]¶
Bases:
MPIParams
Struct to save mpi parameters : - comm : parent mpi communicator (default = main_comm) - task_id : id of the task that owns this object (default = HYSOP_DEFAULT_TASK_ID) - rank of the current process in comm - on_task : true if the task_id of the object corresponds to the task_id of the current process.
This struct is useful for operators : each operator has a MPIParams attribute to save its mpi settings.
Examples
op = SomeOperator(…, task_id=1) if op.is_on_task():
…
‘is_on_task’ will return MPIParams.on_task value for op and tell if the current operator belongs to the current process mpi task.
Create new instance of MPIParams(comm, size, task_id, rank, on_task)
- class hysop.Problem(name=None, method=None, mpi_params=None, check_unique_clenv=True, **kwds)[source]¶
Bases:
ComputationalGraph
- Parameters:
kwds (arguments for base classes.)
Notes
- The following base class variables cannot be specified during graph construction:
variables, input_variables, output_variables
- Order of operation is: add_node, initialize, discretize,
get_work_properties, setup, apply, finalize.
Nodes can also be added during pre initialization step. Graph building is done at the end of the initialization step, after all internal nodes have been initialized.
- build(args=None, allow_subbuffers=False, outputs_are_inputs=True, search_intertasks_ops=None)[source]¶
Shortcut for initialize(), discretize(), get_work_properties(), setup() for quick graph initialization.
- discretize()[source]¶
Discretize this operator. By default this just sets the self.discretized flag to True. Once this flag is set one may call ComputationalGraphNode.get_work_properties() and ComputationalGraphNode.setup().
- finalize()[source]¶
Cleanup this node (free memory from external solvers, …) By default, this does nothing
- class hysop.ScalarParameter(name, **kwds)[source]¶
Bases:
TensorParameter
A scalar parameter is TensorParameter with its shape set to (1,). A parameter is a value that may change as simulation advances.
Initialize a TaggedObject with a tag prefix/postfix/formatter, all optional.
- class hysop.Simulation(name=None, start=0.0, end=1.0, nb_iter=None, dt0=None, max_iter=None, t=None, dt=None, times_of_interest=None, mpi_params=None, quiet=False, clamp_t_to_end=True, restart=0, **kwds)[source]¶
Bases:
object
Time-Simulation process description (time step, iteration …)
- Parameters:
name (str, optional) – Name of this simulation.
start (real, optional) – Initial and final time for simulation.
end (real, optional) – Initial and final time for simulation.
nb_iter (int, optional) – Number of iterations required.
dt0 (real, optional) – Initial time step.
dt (ScalarParameter, optional) – ScalarParameter that will be used as time step. Cannot be a constant parameter.
t (ScalarParameter, optional) – ScalarParameter that will be used as time. Cannot be a constant parameter.
max_iter (int, optional) – Maximum number of iterations allowed. Defaults to 1e9.
times_of_interest (array-like of float) – List of times ti where the simulation may modify current timestep to get t=ti. Mainly used by HDF_Writers for precise time dependent dumping. tstart < ti <= tend Defaults to empty set.
clamp_t_to_end (bool, optional) – Specify if Simulation adjst dt for last iteration to have t=end
restart (int, optional) – Iteration number to start from.
- time¶
current time (value at the end of the time step)
- Type:
real
- dt¶
The scalar parameter that may be updated.
- Type:
hysop.parameter.scalar_parameter.ScalarParameter
- t¶
The scalar parameter that represents time.
- Type:
hysop.parameter.scalar_parameter.ScalarParameter
- time_step¶
Value of the dt parameter.
- Type:
double
Notes
all parameters are optional but either dt0 or nb_iter must be set.
If both dt0 and nb_iter are given, dt0 is not used.
current_iteration = -1 means simulation has not started, and self.time = self.start
current_iteration = 0 after a call to initialize, self.time = self.start + self.time_step, i.e. targeted time.
self.current_iteration = k, runs between self.t and self.tkp1. with self.tkp1 == self.time
- advance(dbg=None, plot_freq=10)[source]¶
Proceed to next time.
Advance time and iteration number.
Compute the new timestep
check if simulation is over.
- finalize()[source]¶
Use this function when you need to call an hdf i/o operator after the end of the time-loop.
- property time_step¶
Get current timestep.
- class hysop.TensorParameter(name, shape, dtype=<class 'numpy.float64'>, pretty_name=None, initial_value=None, min_value=None, max_value=None, ignore_nans=False, **kwds)[source]¶
Bases:
Parameter
A tensor parameter is np.ndarray of a given dtype and shape that may change value as simulation advances.
Initialize a TaggedObject with a tag prefix/postfix/formatter, all optional.
- static __new__(cls, name, shape, dtype=<class 'numpy.float64'>, pretty_name=None, initial_value=None, min_value=None, max_value=None, ignore_nans=False, **kwds)[source]¶
Create or get an existing TensorParameter with a specific name shape and dtype.
- Parameters:
name (string) – A name for the parameter that uniquely identifies it.
pretty_name (string) – A pretty name for the parameter.
shape (array like of ints) – Shape of this TensorParameter.
dtype (type convertible to np.dtype, optional) – Underlying dtype of this TensorParameter. Defaults to HYSOP_REAL.
initial_value (optional, defaults to an uninitialized array.) – Initial value as a scalar or np.ndarray. If not initial value is given, all values initialized to 0.
min_value (scalar, optional, defaults to None) – Minimum value allowed for this parameter.
max_value (scalar, optional, defaults to None) – Maximum value allowed for this parameter.
ignore_nans (bool) – Set this to True to allow NaN values.
kwds (dict) – Base class arguments.
- shape¶
Shape of this TensorParameter.
- Type:
array like of ints
- dtype¶
Underlying dtype of this TensorParameter.
- Type:
type convertible to np.dtype
- min_value¶
Minimum value allowed for this TensorParameter.
- Type:
scalar, optional, defaults to None
- max_value¶
Maximum value allowed for this TensorParameter.
- Type:
scalar, optional, defaults to None
- __setitem__(slices, value)[source]¶
Set a subview on this array parameter to a certain value (value can be broadcasted).
- property ctype¶
Get the data type of the discrete field as a C type.
- property dtype¶
Get parameter dtype.
- property ignore_nans¶
Return True if array can have NaNs.
- property max_value¶
Return maximum value allowed for array values.
- property min_value¶
Return minimum value allowed for array values.
- property shape¶
Get parameter shape.
- property size¶
Get parameter size.
- property tensor_value¶
Get a read-only view on this array parameter but always as a numpy array, even for ScalarParameter parameters.
- class hysop.Topology(domain, mpi_params=None, backend=HOST(1), cl_env=None, allocator=None, queue=None, **kwds)[source]¶
Bases:
RegisteredObject
Abstract base class for hysop Topologies.
In hysop, a topology is defined as the association of a mpi process distribution (mpi topology) and of a set of local meshes (one per process).
At the time, only CartesianTopology topologies with cartesian meshes are available.
For details about topologies see HySoP User Manual. You can also find examples of topologies instanciation in test_topology.py.
Initialize this object. If self._initialized was already set to True, raise a RuntimeError. Else, set self._initialized to True.
- static __new__(cls, domain, mpi_params=None, backend=HOST(1), cl_env=None, allocator=None, queue=None, **kwds)[source]¶
Creates or get an existing topology.
- Parameters:
domain (
Domain
) – the geometry on which the topology is defined.mpi_params (
MPIParams
, optional) – MPI parameters (comm, task …). If not specified, comm = domain.task_comm, task = domain.curent_task()backend (
Backend
or ~hysop.core.arrays.ArrayBackend, optional) – Backend or backend kind for this topology. By default a topology will use Backend.HOST.allocator (
Allocator
, optional) – Allocated used on HOST backends instead of the default host memory pool allocator. Only used if the backend is Backend.HOST.cl_env (
OpenClEnvironment
, optional) – Topology will use this specified OpenClEnvironment when backend is Backend.OPENCL. By default a new environment is created with get_or_create_opencl_env(mpi_params.comm)queue (
pyopencl.Queue
, optional) – Default queue used for OpenCL Arrays. By default this queue will be cl_env.default_queue. Only used if the backend is Backend.OPENCL.kwds (dict) – Base class keyword arguments.
Notes
------
RegisteredObjects. (Topologies can be uniquely identified by their id as they are hysop)
:param See
RegisteredObject
for more information.:
- class hysop.TopologyDescriptor(mpi_params, domain, backend, **kwds)[source]¶
Bases:
object
Describes how a topology should be built.
Multiple compatible topology descriptors are gathered during operator graph building and are replaced by a single unique topology upon initialization.
Initialize a TopologyDescriptor.
Notes
kwds allows for backend specific variables. CartesianTopologyDescriptor is immutable.
- property backend¶
Get backend.
- static build_descriptor(backend, operator, field, handle, **kwds)[source]¶
Generate a descriptor from a lower level representation. If handle is already a Topology or a TopologyDescriptor it is returned unchanged.
If handle is a CartesianTopologyDescriptors (ie. currently a Discretization), a CartesianTopologyDescriptor is created and returned.
Every new topology type should be registered here.
- choose_or_create_topology(known_topologies, **kwds)[source]¶
Returns a topology that is either taken from known_topologies, a set of user specified topologies which are ensured to be compatible with the current TopologyDescriptor, or created from the descriptor if choose_topology() returns None.
- abstract choose_topology(known_topologies, **kwds)[source]¶
Find optimal topology parameters from known_topologies. If None is returned, create_topology will be called instead.
- property dim¶
Get domain dimension.
- property domain¶
Get domain.
- property extra_kwds¶
Get extra keyword arguments.
- property mpi_params¶
Get mpi parameters.
Subpackages¶
- hysop.backend package
- hysop.core package
- hysop.domain package
- hysop.fields package
- hysop.mesh package
- hysop.numerics package
- hysop.operator package
- Subpackages
- Submodules
- hysop.operator.adapt_timestep module
- hysop.operator.advection module
- hysop.operator.analytic module
- hysop.operator.convergence module
- hysop.operator.curl module
- hysop.operator.custom module
- hysop.operator.custom_symbolic module
- hysop.operator.derivative module
- hysop.operator.diffusion module
- hysop.operator.dummy module
- hysop.operator.enstrophy module
- hysop.operator.external_force module
- hysop.operator.flowrate_correction module
- hysop.operator.gradient module
- hysop.operator.hdf_io module
- hysop.operator.integrate module
- hysop.operator.kinetic_energy module
- hysop.operator.mean_field module
- hysop.operator.memory_reordering module
- hysop.operator.min_max module
- hysop.operator.misc module
- hysop.operator.parameter_plotter module
- hysop.operator.penalization module
- hysop.operator.plotters module
- hysop.operator.poisson module
- hysop.operator.poisson_curl module
- hysop.operator.redistribute module
- hysop.operator.reductions module
- hysop.operator.solenoidal_projection module
- hysop.operator.spatial_filtering module
- hysop.operator.transpose module
- hysop.operator.vorticity_absorption module
- hysop.parameters package
- hysop.symbolic package
SpaceSymbol
TimeSymbol
dspace_symbols
dtime_symbol
freq_symbols
global_indices_symbols
local_indices_symbols
space_symbols
time_symbol
- Submodules
- hysop.symbolic.array module
- hysop.symbolic.base module
- hysop.symbolic.complex module
- hysop.symbolic.constant module
- hysop.symbolic.directional module
- hysop.symbolic.field module
- hysop.symbolic.frame module
- hysop.symbolic.func module
- hysop.symbolic.misc module
- hysop.symbolic.parameter module
- hysop.symbolic.relational module
Add
AddAugmentedAssignment
ArithmeticRelation
Assignment
AugmentedAssignment
BinaryFunction
BinaryRelation
DivAugmentedAssignment
LogicalAND
LogicalEQ
LogicalGE
LogicalGT
LogicalLE
LogicalLT
LogicalNE
LogicalOR
LogicalRelation
LogicalXOR
Max
Min
ModAugmentedAssignment
Mul
MulAugmentedAssignment
NAryFunction
NAryRelation
Pow
Round
SubAugmentedAssignment
UnaryFunction
- hysop.symbolic.spectral module
- hysop.symbolic.tmp module
- hysop.tools package
- Submodules
- hysop.tools.cache module
- hysop.tools.callback module
- hysop.tools.contexts module
- hysop.tools.debug_dumper module
- hysop.tools.debug_utils module
- hysop.tools.decorators module
- hysop.tools.field_utils module
BasePrinter
DifferentialStringFormatter
LatexNamePrinter
NamePrinter
PrettyNamePrinter
VarNamePrinter
bcomp_fn()
bdivide_fn()
bexp_fn()
bjoin_fn()
bpow_fn()
bsub_fn()
lcomp_fn()
ldivide_fn()
lexp_fn()
ljoin_fn()
lpow_fn()
lsub_fn()
pcomp_fn()
pdivide_fn()
pexp_fn()
pjoin_fn()
ppow_fn()
print_all_names()
print_latex_name()
print_name()
print_pretty_name()
print_var_name()
psub_fn()
to_str()
vcomp_fn()
vdivide_fn()
vexp_fn()
vjoin_fn()
vpow_fn()
vsub_fn()
- hysop.tools.handle module
- hysop.tools.hash module
- hysop.tools.henum module
- hysop.tools.hptt_utils module
- hysop.tools.htypes module
- hysop.tools.hysop_ls module
- hysop.tools.indices module
- hysop.tools.interface module
- hysop.tools.io_utils module
- hysop.tools.method_utils module
- hysop.tools.misc module
- hysop.tools.mpi_utils module
- hysop.tools.numba_utils module
- hysop.tools.numerics module
complex_to_float_dtype()
default_invalid_value()
demote_dtype()
determine_fp_types()
find_common_dtype()
float_to_complex_dtype()
get_dtype()
get_itemsize()
is_complex()
is_fp()
is_integer()
is_signed()
is_unsigned()
match_bool_type()
match_complex_type()
match_dtype()
match_float_type()
match_signed_type()
match_unsigned_type()
- hysop.tools.numpywrappers module
- hysop.tools.opencl_explore module
- hysop.tools.parameters module
- hysop.tools.plotDrag module
- hysop.tools.profiler module
- hysop.tools.spectral_utils module
- hysop.tools.string_utils module
- hysop.tools.sympy_utils module
AppliedUndef
CustomLatexPrinter
CustomStrPrinter
CustomStrReprPrinter
Dummy
Expr
SetupExprI
Symbol
SymbolicBase
UndefinedFunction
UnevaluatedExpr
UnsplittedExpr
build_eqs_from_dicts()
enable_pretty_printing()
evalf_str()
exponent()
exponents()
factor_split()
get_derivative_variables()
latex()
non_eval_xreplace()
recurse_expression_tree()
remove_pows()
round_expr()
sstr()
sstrrepr()
subscript()
subscripts()
tensor_symbol()
tensor_xreplace()
truncate_expr()
- hysop.tools.sys_utils module
- hysop.tools.transposition_states module
- hysop.tools.units module
- hysop.tools.variable module
- hysop.tools.warning module
- Submodules
- hysop.topology package
Submodules¶
- hysop.constants module
AutotunerFlags
Backend
BoundaryCondition
BoundaryConditionConfig
BoxBoundaryCondition
CacheType
ComputeGranularity
DeviceType
DirectionLabels
Directions
FieldProjection
FpConfig
HYSOP_BOOL
HYSOP_COMPLEX
HYSOP_DEFAULT_TASK_ID
HYSOP_DIM
HYSOP_EPS
HYSOP_INDEX
HYSOP_INTEGER
HYSOP_MPI_INTEGER
HYSOP_MPI_REAL
HYSOP_ORDER
HYSOP_REAL
Implementation
MemoryOrdering
MemoryType
PenalizationFormulation
Precision
ResidualError
SIZEOF_HYSOP_BOOL
SIZEOF_HYSOP_COMPLEX
SIZEOF_HYSOP_DIM
SIZEOF_HYSOP_INDEX
SIZEOF_HYSOP_INTEGER
SIZEOF_HYSOP_REAL
SpaceDiscretization
StretchingFormulation
SymbolicExpressionKind
System
TimeIntegratorsOptimisationLevel
boundary2str()
default_order
format_boundaries()
implementation_to_backend()
- hysop.defaults module
- hysop.f2hysop module
- hysop.iterative_method module
- hysop.methods module
- hysop.operators module
- hysop.problem module
- hysop.simulation module
- Usage
Simulation
Simulation.time
Simulation.current_iteration
Simulation.is_over
Simulation.dt
Simulation.t
Simulation.time_step
Simulation.time_of_interest
Simulation.advance()
Simulation.finalize()
Simulation.initialize()
Simulation.load_checkpoint()
Simulation.next_time_of_interest()
Simulation.print_state()
Simulation.save_checkpoint()
Simulation.time_step
Simulation.update_time()
Simulation.update_time_step()
Simulation.write_parameters()